import React, {Component} from 'react';
import PropTypes from 'prop-types';
import {InputItem, Button, List} from 'antd-mobile';
import { withRouter } from "react-router-dom"

import { NavBar, Icon } from 'antd-mobile';
class AnonymousBar extends Component {
    state = {
        clickLike : false
    }
    onLike() {
        if(this.state.clickLike == true) return;
        console.log("Like me!");
        this.setState({clickLike : true});
    }
    render(){
        return(
            <NavBar className = "my-bar" 
        mode="dark"
        leftContent={[
          <Icon onClick={()=>{this.props.history.push("/Match")}} key="0" type="left" style={{ marginRight: '16px' }} />
         ]}
         rightContent={[
        <Icon onClick={()=>this.onLike()} key="0" type={(!this.state.clickLike)?"check":"check-circle"} style={{ marginRight: '16px' }} >Like</Icon>
         ]}
     >Your Father</NavBar>
        )
    }
}

export default withRouter(AnonymousBar)